﻿// *----------------------------------------------------------------
// Copyright (C) 2017 通通优品
// 版权所有。
// 
// 类名：IRefreshTokenService.cs
// 功能描述：TongTongMall.MallWeb.Application
// 
// Create User：jym 2017/02/09
// 
// Edit User：UserName,EditTime
// Describe：Describe
// ----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TongTongMall.Application.Services;
using TongTongMall.MallWeb.ApplicationToken.Dto;

namespace TongTongMall.MallWeb.Application.Token
{
    public interface IRefreshTokenService : IApplicationService
    {
        /// <summary>
        /// 固化refreshtoken 
        /// </summary>
        /// <param name="token"></param>
        /// <returns></returns>
        Task<bool> Save(RefreshTokenDto token);

        /// <summary>
        /// 移除refreshToken
        /// </summary>
        /// <param name="tokenId"></param>
        /// <returns></returns>
        Task<bool> Remove(string tokenId);

        /// <summary>
        /// 获取刷新令牌信息
        /// </summary>
        /// <param name="tokenId"></param>
        /// <param name="clientId"></param>
        /// <returns></returns>
        Task<RefreshTokenDto> Get(string tokenId, long clientId);
    }
}
